<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    Array.prototype.getMax = function () {
        return Math.max(...this)
    }
    Array.prototype.getMin = function () {
      return Math.min(...this)

    }

    Array.prototype.getSum = function () {
      return this.reduce((accumulator, currentValue, currentIndex, arr) => {
        return accumulator += currentValue
      })
    }
    const arr1 = [1, 2]
    console.log(arr1.getSum());
    console.log(arr1.getMin());
    console.log(arr1.getMax());
  </script>
</body>

</html>